package com.example.demomail.model;

import com.example.demomail.config.DateDeserializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author 赵恒
 * @date 2023/5/29
 * 告警返回对象
 */
@NoArgsConstructor
@Data
@ApiModel(value = "RiskAlarmInfoVo", description = "风险预警信息")
public class RiskAlarmInfoVo {

    @ApiModelProperty("预警级别，恢复:0,警告:1,关键:2，严重:3")
    private Integer severity;

    @ApiModelProperty(value = "预警环节", required = true)
    private String alarmLink;

    @ApiModelProperty("预警类型")
    private String alarmType;

    @ApiModelProperty(value = "预警对象", required = true)
    private String entityName;

    @ApiModelProperty(value = "预警内容", required = true)
    private String content = "";

    @ApiModelProperty("发布时间")
    @JsonDeserialize(using = DateDeserializer.class)
    private Date occurTime;

    @ApiModelProperty("影响时长/h")
    private Double impactDuration;

    @ApiModelProperty(value = "责任单位", required = true)
    private String company;

    @ApiModelProperty("预警状态，待处理:1,处理中:2,已解决:3,关闭:0")
    private Integer status;

    @ApiModelProperty("预警处置")
    private String alarmHandle = "";

    @ApiModelProperty("备注")
    private String remark = "";
}
